/* --------------------------------------------------------
 * Copyright (c) aeky , Inc.  All rights reserved.
 * --------------------------------------------------------
 */
package com.aeky.singleton;

/**
 * 饿汉单例模式，会有多线程问题
 * 
 * @author aeky
 */
public class Singleton4Lazy {

    private static Singleton4Lazy instance;

    private Singleton4Lazy() {

    }

    public static Singleton4Lazy getInstance() {
        if (instance == null) {
            instance = new Singleton4Lazy();
        }
        return instance;
    }
}
